package com.wxzz.elearing.pay.wx.pc;

import com.github.wxpay.sdk.WXPayConfig;
import com.wxzz.elearning.common.constants.WxPayConstants;

import java.io.InputStream;

public class WXPayConfigImpl implements WXPayConfig {

    @Override
    public String getAppID() {
        return WxPayConstants.WX_APPID;
    }

    @Override
    public String getMchID() {
        return WxPayConstants.MCH_ID;
    }

    @Override
    public String getKey() {
        return WxPayConstants.WX_KEY;
    }

    @Override
    public InputStream getCertStream() {
        //退款时使用
        InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("apiclient_cert.p12");
        return certStream;
    }

    @Override
    public int getHttpConnectTimeoutMs() {
        return 0;
    }

    @Override
    public int getHttpReadTimeoutMs() {
        return 0;
    }
}
